package com.rtx.wms.std.express.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.rtx.api.annotation.DataSourceAnnotation;
import com.rtx.edi.model.api.bo.ApiMappingInfoBo;
import com.rtx.edi.model.express.po.PlExpressApiConfig;
import com.rtx.wms.std.express.bean.ExpressOrders;
import com.rtx.wms.std.express.mapper.ExpressMapper;
import com.rtx.wms.std.express.service.ExpressOrdersService;

@Service
public class ExpressOrdersServiceImpl implements ExpressOrdersService{
	
	@Autowired
	ExpressMapper expressMapper;

	@DataSourceAnnotation
	@Override
	public List<ExpressOrders> queryOrdersKeys(String datasourcekey) {
		return expressMapper.queryOrdersKeys();
	}
	
	
	@DataSourceAnnotation
	@Override
	public List<ExpressOrders> queryByOrdersByConfig(String datasourcekey,ApiMappingInfoBo ediConfig) {
		PlExpressApiConfig config = ediConfig.getExpressconfig();
		return expressMapper.queryOrdersKeysByConfig(config);
	}

	@DataSourceAnnotation
	@Override
	public List<ExpressOrders> queryOrdersJitxKeys(String datasourcekey) {
		return expressMapper.queryOrdersJitxKeys();
	}

	@DataSourceAnnotation
	@Override
	public List<ExpressOrders> queryOrdersjitxPrintData(String datasourcekey) {
		return expressMapper.queryOrdersjitxPrintData();
	}

	@DataSourceAnnotation
	@Override
	public int updExpressStatus(String datasourcekey, String status, String msg, String orderkey) {
		return expressMapper.updExpressStatus(status,msg,orderkey);
	}

	@DataSourceAnnotation
	@Override
	public int updExpressData(String datasourcekey,String rtxexpresskey, String printdate, String orderkey) {
		return expressMapper.updExpressData(rtxexpresskey,printdate,orderkey);
	}
}
